this.BX=this.BX||{};(function(e){"use strict";var t={};(function e(t,n,r,a){var i=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL);function o(){}function l(e){var r=n.exports.Promise;var a=r!==void 0?r:t.Promise;if(typeof a==="function"){return new a(e)}e(o,o);return null}var s=function(){var e=Math.floor(1e3/60);var t,n;var r={};var a=0;if(typeof requestAnimationFrame==="function"&&typeof cancelAnimationFrame==="function"){t=function t(n){var i=Math.random();r[i]=requestAnimationFrame((function t(o){if(a===o||a+e-1<o){a=o;delete r[i];n()}else{r[i]=requestAnimationFrame(t)}}));return i};n=function e(t){if(r[t]){cancelAnimationFrame(r[t])}}}else{t=function t(n){return setTimeout(n,e)};n=function e(t){return clearTimeout(t)}}return{frame:t,cancel:n}}();var c=function(){var t;var n;var a={};function o(e){function t(t,n){e.postMessage({options:t||{},callback:n})}e.init=function t(n){var r=n.transferControlToOffscreen();e.postMessage({canvas:r},[r])};e.fire=function r(i,o,s){if(n){t(i,null);return n}var c=Math.random().toString(36).slice(2);n=l((function(r){function o(t){if(t.data.callback!==c){return}delete a[c];e.removeEventListener("message",o);n=null;s();r()}e.addEventListener("message",o);t(i,c);a[c]=o.bind(null,{data:{callback:c}})}));return n};e.reset=function t(){e.postMessage({reset:true});for(var n in a){a[n]();delete a[n]}}}return function(){if(t){return t}if(!r&&i){var n=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {","  if (msg.data.options) {","    CONFETTI(msg.data.options).then(function () {","      if (msg.data.callback) {","        postMessage({ callback: msg.data.callback });","      }","    });","  } else if (msg.data.reset) {","    CONFETTI.reset();","  } else if (msg.data.resize) {","    SIZE.width = msg.data.resize.width;","    SIZE.height = msg.data.resize.height;","  } else if (msg.data.canvas) {","    SIZE.width = msg.data.canvas.width;","    SIZE.height = msg.data.canvas.height;","    CONFETTI = module.exports.create(msg.data.canvas);","  }","}"].join("\n");try{t=new Worker(URL.createObjectURL(new Blob([n])))}catch(e){(typeof console==="undefined"?"undefined":babelHelpers["typeof"](console))!==undefined&&typeof console.warn==="function"?console.warn("\u0440\u045f\u040b\u0409 Count not load worker",e):null;return null}o(t)}return t}}();var f={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:false};function u(e,t){return t?t(e):e}function h(e){return!(e===null||e===undefined)}function d(e,t,n){return u(e&&h(e[t])?e[t]:f[t],n)}function v(e,t){return Math.floor(Math.random()*(t-e))+e}function g(e){return parseInt(e,16)}function m(e){var t=String(e).replace(/[^0-9a-f]/gi,"");if(t.length<6){t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}return{r:g(t.substring(0,2)),g:g(t.substring(2,4)),b:g(t.substring(4,6))}}function b(e){var t=d(e,"origin",Object);t.x=d(t,"x",Number);t.y=d(t,"y",Number);return t}function p(e){e.width=document.documentElement.clientWidth;e.height=document.documentElement.clientHeight}function y(e){var t=e.getBoundingClientRect();e.width=t.width;e.height=t.height}function M(e){var t=document.createElement("canvas");t.style.position="fixed";t.style.top="0px";t.style.left="0px";t.style.pointerEvents="none";t.style.zIndex=e;return t}function w(e,t,n,r,a,i,o,l,s){e.save();e.translate(t,n);e.rotate(i);e.scale(r,a);e.arc(0,0,1,o,l,s);e.restore()}function x(e){var t=e.angle*(Math.PI/180);var n=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:Math.random()*10,velocity:e.startVelocity*.5+Math.random()*e.startVelocity,angle2D:-t+(.5*n-Math.random()*n),tiltAngle:Math.random()*Math.PI,color:m(e.color),shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:e.gravity*3,ovalScalar:.6}}function C(e,t){t.x+=Math.cos(t.angle2D)*t.velocity;t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity;t.wobble+=.1;t.velocity*=t.decay;t.tiltAngle+=.1;t.tiltSin=Math.sin(t.tiltAngle);t.tiltCos=Math.cos(t.tiltAngle);t.random=Math.random()+5;t.wobbleX=t.x+10*Math.cos(t.wobble);t.wobbleY=t.y+10*Math.sin(t.wobble);var n=t.tick++/t.totalTicks;var r=t.x+t.random*t.tiltCos;var a=t.y+t.random*t.tiltSin;var i=t.wobbleX+t.random*t.tiltCos;var o=t.wobbleY+t.random*t.tiltSin;e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-n)+")";e.beginPath();if(t.shape==="circle"){e.ellipse?e.ellipse(t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(o-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):w(e,t.x,t.y,Math.abs(i-r)*t.ovalScalar,Math.abs(o-a)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI)}else{e.moveTo(Math.floor(t.x),Math.floor(t.y));e.lineTo(Math.floor(t.wobbleX),Math.floor(a));e.lineTo(Math.floor(i),Math.floor(o));e.lineTo(Math.floor(r),Math.floor(t.wobbleY))}e.closePath();e.fill();return t.tick<t.totalTicks}function I(e,t,n,i,o){var c=t.slice();var f=e.getContext("2d");var u;var h;var d=l((function(t){function l(){u=h=null;f.clearRect(0,0,i.width,i.height);o();t()}function d(){if(r&&!(i.width===a.width&&i.height===a.height)){i.width=e.width=a.width;i.height=e.height=a.height}if(!i.width&&!i.height){n(e);i.width=e.width;i.height=e.height}f.clearRect(0,0,i.width,i.height);c=c.filter((function(e){return C(f,e)}));if(c.length){u=s.frame(d)}else{l()}}u=s.frame(d);h=l}));return{addFettis:function e(t){c=c.concat(t);return d},canvas:e,promise:d,reset:function e(){if(u){s.cancel(u)}if(h){h()}}}}function k(e,n){var r=!e;var a=!!d(n||{},"resize");var o=d(n,"disableForReducedMotion",Boolean);var s=i&&!!d(n||{},"useWorker");var f=s?c():null;var u=r?p:y;var h=e&&f?!!e.__confetti_initialized:false;var g=typeof matchMedia==="function"&&matchMedia("(prefers-reduced-motion)").matches;var m;function w(t,n,r){var a=d(t,"particleCount",Math.floor);var i=d(t,"angle",Number);var o=d(t,"spread",Number);var l=d(t,"startVelocity",Number);var s=d(t,"decay",Number);var c=d(t,"gravity",Number);var f=d(t,"colors");var h=d(t,"ticks",Number);var g=d(t,"shapes");var p=b(t);var y=a;var M=[];var w=e.width*p.x;var C=e.height*p.y;while(y--){M.push(x({x:w,y:C,angle:i,spread:o,startVelocity:l,color:f[y%f.length],shape:g[v(0,g.length)],ticks:h,decay:s,gravity:c}))}if(m){return m.addFettis(M)}m=I(e,M,u,n,r);return m.promise}function C(n){var i=o||d(n,"disableForReducedMotion",Boolean);var s=d(n,"zIndex",Number);if(i&&g){return l((function(e){e()}))}if(r&&m){e=m.canvas}else if(r&&!e){e=M(s);document.body.appendChild(e)}if(a&&!h){u(e)}var c={width:e.width,height:e.height};if(f&&!h){f.init(e)}h=true;if(f){e.__confetti_initialized=true}function v(){if(f){var t={getBoundingClientRect:function t(){if(!r){return e.getBoundingClientRect()}}};u(t);f.postMessage({resize:{width:t.width,height:t.height}});return}c.width=c.height=null}function b(){m=null;if(a){t.removeEventListener("resize",v)}if(r&&e){document.body.removeChild(e);e=null;h=false}}if(a){t.addEventListener("resize",v,false)}if(f){return f.fire(n,c,b)}return w(n,c,b)}C.reset=function(){if(f){f.reset()}if(m){m.reset()}};return C}n.exports=k(null,{useWorker:true,resize:true});n.exports.create=k})(function(){if(typeof window!=="undefined"){return window}if(typeof self!=="undefined"){return self}return this}(),t,false);var n=t.exports;var r=t.exports.create;var a=function e(){babelHelpers.classCallCheck(this,e)};babelHelpers.defineProperty(a,"fire",n);babelHelpers.defineProperty(a,"create",n.create);e.Confetti=a})(this.BX.UI=this.BX.UI||{});
//# sourceMappingURL=confetti.bundle.map.js